{% extends base %}

{% block body_left %}
{% include system/component/db_nav.html %}

<div class="card">
    <div class="x-tab-box" data-tab-key="p2" data-tab-default="active">
        <a class="x-tab" href="{{_server_home}}/system/sqldb_admin?p=sqldb&p2=active" data-tab-value="active">活跃</a>
        <a class="x-tab" href="{{_server_home}}/system/sqldb_admin?p=sqldb&p2=delete" data-tab-value="delete">已删除</a>
    </div>
</div>

<div class="card">

    <table class="table">
        <tr>
            <th>表名</th>
            <th>说明</th>
            <th>记录数</th>
            <th>操作</th>
        </tr>
        {% for db in db_info_list %}
        <tr class="hover-tr">
            <td><a href="{{_server_home}}/system/sqldb_detail?name={{db.name}}">{{db.name}}</a></td>
            <td>{{db.comment}}</td>
            <td>{{db.amount}}</td>
            <td>
                <a class="btn btn-default" href="{{_server_home}}/system/sqldb_operate?table_name={{db.name}}">操作</a>
                <a class="btn btn-default" href="{{_server_home}}/system/db/struct?table_name={{db.name}}">结构</a>
            </td>
        </tr>
        {% end %}
    </table>
</div>

<script type="text/javascript">
    xnote.table.adjustWidth(".table");
</script>
{% end %}

{% block body_right %}
    {% include system/component/admin_nav.html %}
{% end %}